package btp.CoordinateSystems;

import btp.Time.SiderealTime;

public class EquatorialCoordinate {

	SiderealTime rightAscension;
	double declination;
	
	
	public SiderealTime getRightAscension() {
		return rightAscension;
	}
	public void setRightAscension(SiderealTime rightAscension) {
		this.rightAscension = rightAscension;
	}
	public double getDeclination() {
		return declination;
	}
	public void setDeclination(double declination) {
		this.declination = declination;
	}
	
	public EquatorialCoordinate(){
		
	}
	public EquatorialCoordinate(SiderealTime rightAscension, double declination) {
		this.rightAscension = rightAscension;
		this.declination = declination;
	}

	public SiderealTime rightAscensionToHourAngle(SiderealTime time){
		return SiderealTime.getDifference(time,rightAscension);
	}
	
	public static SiderealTime hourAngleToRightAscension(SiderealTime time, SiderealTime hourAngle){
		return SiderealTime.getDifference(time,hourAngle);
	}
	
	public SiderealTime rightAscensionToHourAngle(SiderealTime greenwichTime, Longitude longitude)
	{
		return SiderealTime.getDifference(SiderealTime.getDifference(greenwichTime,rightAscension), (SiderealTime) longitude.getTime());
	}
	
	public static SiderealTime hourAngleToRightAscension(SiderealTime greenwichTime, SiderealTime hourAngle, Longitude longitude){
		return SiderealTime.getDifference(SiderealTime.getDifference(greenwichTime,hourAngle), (SiderealTime) longitude.getTime());
	}
}
